import request from '@/utils/Request';
import { stringify } from 'qs';


export async function add(params) {
  return request(`/joker/blogs/add`, {
    method: 'POST',
    data: {
      ...params
    }
  });
}

export async function update(params) {
  return request(`/joker/blogs/update`, {
    method: 'POST',
    data: {
      ...params
    }
  });
}

export async function deleteById(params) {
  return request(`/joker/blogs/delete?${stringify(params)}`, {
    method: 'GET'
  });
}

export async function queryByCode(params) {
  return request(`/joker/dictionary/queryByCode?${stringify(params)}`, {
    method: 'GET'
  });
}
